<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\Comment;
use App\Models\Detail;
use App\Models\Cart;
use App\Models\Goods;
use App\Models\Order;
use App\Traits\ApiResponse;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Models\Match;

class CommentController extends Controller
{

    use ApiResponse;

    public function index(Request $request)
    {

        return view('admin.comments.index', [
        ]);
    }

    public function getList(Request $request)
    {
        $list = Comment::query()->with('user')->paginate();
        return $this->success($list);
    }

    public function destroy(Request $request)
    {
        Comment::query()->where('id', $request['id'])->delete();
        return $this->success([], '删除成功');
    }
}
